﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>《数码宝贝：圣十字军》</title>
    <meta name="viewport" content="width=480, user-scalable=no, target-densitydpi=device-dpi" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    
    <link rel="stylesheet" href="Assets/Css/comm.css?v=1158">
        <script src="Assets/Scripts/jquery-1.10.1.min.js"></script>
    <script src="Assets/JqueryMoblie/jquery.mobile-1.4.4.min.js"></script>
    <link href="Assets/JqueryMoblie/jquery.mobile-1.4.4.css" rel="stylesheet" />
    <script src="Assets/JqueryMoblie/SwipeUp.js"></script>

    <script>
        window.onload = function () {
            if (getCookie("Key") == "") {
                $("#ptext").val(getCookie("msg"));
            }
            else {
                if (getCookie("code") == "success") {
                    $("#ptext").val("礼包码：" + getCookie("Key"));
                }
                else {
                    $("#ptext").val("");
                }
                
            }
            
      
        }
        function getCookie(name) {
            var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");

            if (arr = document.cookie.match(reg))

                return unescape(arr[2]);
            else
                return null;
        }
        function copyText() {
            var text = $("#ptext").val();
            copyToClipboard(text);
        }
        function copyToClipboard(text) {
            if (text == '') return false;

            var txt = text;
            //IE
            if (window.clipboardData) {
                window.clipboardData.clearData();
                window.clipboardData.setData("Text", txt);
                alert("复制成功");
                
              window.location = "MainPages.html";

            }
                //Firefox
            else if (window.netscape) {
                try {
                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                } catch (e) {
                    alert("被浏览器拒绝！请在浏览器地址栏输入'about:config'并回车，然后将'signed.applets.codebase_principal_support'设置为'true'");
                }
                var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
                if (!clip) return;

                var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
                if (!trans) return;

                trans.addDataFlavor('text/unicode');
                var str = new Object();
                var len = new Object();
                var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
                var copytext = txt;
                str.data = copytext;
                trans.setTransferData("text/unicode", str, copytext.length * 2);
                var clipid = Components.interfaces.nsIClipboard;
                if (!clip) return false;
                clip.setData(trans, null, clipid.kGlobalClipboard);
                alert("复制成功");
window.location = "MainPages.html";
            }
            else {
                alert("您使用的浏览器不支持此功能，请手动复制");
            }
            
        }
        function download() {
            var browser = {
                versions: function () {
                    var u = navigator.userAgent, app = navigator.appVersion;
                    return {//移动终端浏览器版本信息 
                        trident: u.indexOf('Trident') > -1, //IE内核
                        presto: u.indexOf('Presto') > -1, //opera内核
                        webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
                        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
                        mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //是否为移动终端
                        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                        android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
                        iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
                        iPad: u.indexOf('iPad') > -1, //是否iPad
                        webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
                    };
                }(),
                language: (navigator.browserLanguage || navigator.language).toLowerCase()
            }

            if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
                window.location = "http://www.tyyouxi.com/e/action/Download.php?id=10";
            }
            else if (browser.versions.android) {
                window.location = "http://www.tyyouxi.com/e/action/Download.php?id=10";
            }
        }
    </script>
    <!--<script type="text/javascript">
        function getQueryString(name, type) {
            if (type == 1) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]); return null;
            } else {
                var str2 = window.location.href;
                var str = new Array();
                str = str2.split("/");
                if (name == "ans") {
                    return str[4];
                } else if (name == "img") {
                    return str[5];
                } else if (name == "tit") {
                    return str[6];
                } else if (name == "des") {
                    return str[7];
                } else if (name == "sev") {
                    return str[8];
                }
            }

        }
        if (getQueryString('ans') != null) {
            var ans = getQueryString('ans');
        } else {
            var ans = 1;
        }

        if (getQueryString('img') != null) {
            var img = getQueryString('img');
        } else {
            var img = 1;
        }

        if (getQueryString('tit') != null) {
            var tit = decodeURIComponent(getQueryString('tit'));
        } else {
            var tit = "真日本双飞!<数码宝贝>唯一正版手游今日上线送IP6";
        }

        if (getQueryString('des') != null) {
            var des = decodeURIComponent(getQueryString('des'));
        } else {
            var des = "̫�����ˣ���Ҳ�����԰ɣ�";
        }

        if (getQueryString('sev') != null) {
            var sev = "http://" + getQueryString('sev') + "/";
        } else {
            var sev = "";
        }
        var _con = {}; _con["num"] = img; _con["type"] = "weit4";
	</script>-->
</head>
<body> <img src="Assets/Images/Icon.png" style="width:1px;" />
 
        <div data-role="page" id="pageOne" class="scene-a">
               <div style="position:absolute; width:100%;height:100%;background-color:rgba(0, 0, 0, 0.58); z-index:100;" id="mask"></div>
 <div style="position:absolute;width:100%;height:280px;top:30%;background:url('Assets/Images/backImage.png') no-repeat;background-size:100%;z-index:101;" id="pagefour">

            <p style=" color:#092bf6; font-size:20px;text-align:center; margin-top:50px; margin-bottom:20px; font-weight:bold; font-family:微软雅黑;" class="PStroke">恭喜您获得《数码宝贝:圣十字军》至尊数码礼包！</p>
     <div> <p style="float:left; margin-left:20px; margin-top:5px;"><input type="text" style="width:300px;height:35px;  " readonly="readonly"  data-role='none' id="ptext" /></p>
          <p style="float:left; margin-left:30px;"><input type="button" data-role='none' style="background-image:url('Assets/Images/CopyTwo.png');background-size:100%; width:110px; height:50px; background-color:rgba(173, 33, 33, 0.00);border:0;"  onclick="copyText();" /></p>
     </div>
           
           
            <p style="text-align:center; margin-top:90px;">
              <input type="button" onclick="download()" data-role='none' style="background-image:url('Assets/Images/DownLoad.png');background-size:100%; width:270px; height:58px; background-color:rgba(173, 33, 33, 0.00);border:0;"  />
            </p>
        
        </div>
        <div role="main" class="ui-content" style="padding:0;">
                        <div class="fuhao">
                <img src="Assets/Images/fuhao.png" />
            </div>

        </div>

        </div>
    <!--<script type="text/javascript">
        var url = "weit4/";
        var urls = "Prize.html";

        function returnBack() {
            location.href = sev + "MainPages.html";
        }

        var mebtnopenurl = sev + "MainPages.html";
        var dataForWeixin = {
            "appId": "",
            "imgUrl": "http://wx.digicru.tyyouxi.com/" + "Assets/Images/Icon.png",
            "timeLineLink": "",
            "url": "http://wx.digicru.tyyouxi.com/" + "MainPages.html",
            "title": tit,
            "desc": " "
        };
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            WeixinJSBridge.call('showOptionMenu');
            WeixinJSBridge.on('menu:share:appmessage', function (argv) {
                WeixinJSBridge.invoke('sendAppMessage', {
                    "appid": dataForWeixin.appId,
                    "img_url": dataForWeixin.imgUrl,
                    "link": dataForWeixin.url,
                    "desc": dataForWeixin.desc,
                    "title": "真日本双飞!<数码宝贝>唯一正版手游今日上线送IP6"
                });
                setTimeout(function () { location.href = mebtnopenurl; }, 1500);
            });

            WeixinJSBridge.on('menu:share:timeline', function (argv) {
                WeixinJSBridge.invoke('shareTimeline', {
                    "appid": dataForWeixin.appId,
                    "img_url": dataForWeixin.imgUrl,
                    "img_width": "640",
                    "img_height": "640",
                    "link": dataForWeixin.url,
                    "desc": dataForWeixin.desc,
                    "title": "真日本双飞!<数码宝贝>唯一正版手游今日上线送IP6"
                });
                setTimeout(function () { location.href = mebtnopenurl; }, 1500);
            });
        }, false);

    </script>-->

    <!--<script type="text/javascript">
        var num = 1;//Math.round(Math.random()*2+1);
        var str = tit;
        var str1 = "";
        var data = new Array();
        data = str.split("");
        var j = 0;
        var len = str.length - 3;
        var num1 = 2;//Math.round(Math.random()*+len+1);
        var num2 = 4;
        for (var i = 0; i < str.length; i++) {
            if (data[i] != undefined) {
                if (num == 1) {
                    if (num1 == i || num2 == i) {
                        str1 += data[i] + " ";
                        j++;
                    } else {
                        str1 += data[i];
                    }
                }
            }
        }
        dataForWeixin.title = str1;
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            WeixinJSBridge.call('hideToolbar');
        });
    </script>-->
</body>
</html>
